import { Guid } from './../../common/utils/guid';

export class WorkflowOrder {
    id: string = Guid.GetGuid();
    status: 'init' | 'doing' | 'closed';
    workflowId: string;
    createTime: number = Date.now();
    updateTime: number;
    finishTime: number;
    dataField: any;
    flowNodesItems: WorkflowOrderNodesItem[] = [];
}

export class WorkflowOrderNodesItem {
    id: string = Guid.GetGuid();  
    flowNodeId: string;
    workflowOrderId: string;
    beginTime?: number;
    endTime?: number;
    status?: 'executing' | 'finished';
}